package com.jmxcfc.blfsc.jiwei.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PreDestroy;
import java.util.Map;

@Configuration
@ConfigurationProperties("jiwei")
@EnableConfigurationProperties(JiweiProperties.class)
@Data
public class JiweiProperties {

    /**
     * 集微(下行(不同内容))接口地址
     */
    private String sendDifferentUrl;

    private String sendSameUrl;

    private Map<String, Object> accountMap;


    /**
     * 必须加,否则新增可以动态刷新,删除不能
     */
    @PreDestroy
    public void destroy() {
        accountMap = null;
    }
}